import { $gc } from 'gc-starter-ui-plus'

export function getList(params = {}, flag = false) {
    return $gc.get(
        '/friend/',
        params,
        flag
    )
}

export function addFriend(data = {}, flag = false) {
    return $gc.post(
        '/friend',
        data,
        flag
    )
}

export function updateFriend(data = {}, flag = false) {
    return $gc.put(
        '/friend',
        data,
        flag
    )
}

export function delFriend(id, params = {}, flag = false) {
    return $gc.del(
        `/friend/${id}`,
        params,
        flag
    )
}

export function getFriendInfo(id, params = {}, flag = false) {
    return $gc.get(
        `/friend/${id}`,
        params,
        flag
    )
}

export function checkRepeat(params = {}, flag = false) {
    return $gc.post(
        `/friend/repeat`,
        params,
        flag
    )
}